<html>
<head><meta charset="utf-8"><title>cargo build -Z help is missing options #9350 · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20build.20-Z.20help.20is.20missing.20options.20.239350.html">cargo build -Z help is missing options #9350</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="234905229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20build%20-Z%20help%20is%20missing%20options%20%239350/near/234905229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> PicoJr <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20build.20-Z.20help.20is.20missing.20options.20.239350.html#234905229">(Apr 16 2021 at 19:04)</a>:</h4>
<p>New topic for discussing <a href="https://github.com/rust-lang/cargo/issues/9350">https://github.com/rust-lang/cargo/issues/9350</a><br>
(title edited following cuviper advice)</p>



<a name="234905579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20build%20-Z%20help%20is%20missing%20options%20%239350/near/234905579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20build.20-Z.20help.20is.20missing.20options.20.239350.html#234905579">(Apr 16 2021 at 19:07)</a>:</h4>
<p>(meta: it helps to copy the subject at least, so folks have context without memorizing issue numbers)</p>



<a name="234906185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20build%20-Z%20help%20is%20missing%20options%20%239350/near/234906185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> PicoJr <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20build.20-Z.20help.20is.20missing.20options.20.239350.html#234906185">(Apr 16 2021 at 19:12)</a>:</h4>
<p>I'm writing a macro to declare <code>CliUnstable</code> and generate a help message.<br>
I don't know how to keep the attribute macro cf <a href="https://github.com/rust-lang/cargo/blob/e870eac9967b132825116525476d6875c305e4d8/src/cargo/core/features.rs#L558">https://github.com/rust-lang/cargo/blob/e870eac9967b132825116525476d6875c305e4d8/src/cargo/core/features.rs#L558</a>.</p>



<a name="234910915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20build%20-Z%20help%20is%20missing%20options%20%239350/near/234910915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20build.20-Z.20help.20is.20missing.20options.20.239350.html#234910915">(Apr 16 2021 at 19:51)</a>:</h4>
<p><span class="user-mention" data-user-id="406296">@PicoJr</span> You can maybe use something like <code>$(#[$meta:meta])*</code> to capture optional attributes.</p>



<a name="234911550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20build%20-Z%20help%20is%20missing%20options%20%239350/near/234911550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> PicoJr <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20build.20-Z.20help.20is.20missing.20options.20.239350.html#234911550">(Apr 16 2021 at 19:56)</a>:</h4>
<p>Ok, now I need to use this optional meta in my macro: <a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=efa0c88c260bb49b0cb8b7f8c7b4779e">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=efa0c88c260bb49b0cb8b7f8c7b4779e</a></p>
<p>(I don't know how I can use <code>$meta</code> afterwards)</p>
<p>Nevermind, I've found the way: <code>$(#[$meta])?</code></p>



<a name="234914207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20build%20-Z%20help%20is%20missing%20options%20%239350/near/234914207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> PicoJr <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20build.20-Z.20help.20is.20missing.20options.20.239350.html#234914207">(Apr 16 2021 at 20:16)</a>:</h4>
<p>I pushed a very wip coarse draft: <a href="https://github.com/PicoJr/cargo/commit/d5e01bf8f159b9024d5da33a5fc7b115878bed15">https://github.com/PicoJr/cargo/commit/d5e01bf8f159b9024d5da33a5fc7b115878bed15</a><br>
It is nowhere near finished and fails the corresponding unit test but it's a start.</p>
<p>Time to sleep for me.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>